home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4453 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  54 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: chang.unx.sas.com!walker
  3. From: walker@chang.unx.sas.com (Doug Walker)
  4. Subject: Re: Shared Lib problems
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <DnJEs1.Lr0@unx.sas.com>
  7. Date: Thu, 29 Feb 1996 12:31:13 GMT
  8. X-Nntp-Posting-Host: chang.unx.sas.com
  9. References: <65641284%agos001@pn.itnet.it>
  10. Organization: SAS Institute Inc.
  11.  
  12. In article <65641284%agos001@pn.itnet.it>,
  13. Stefano Agostinelli <agos001@pn.itnet.it> wrote:
  14. >Hi,
  15. >
  16. >I'm experiencing some problems during the development of a shared library.
  17. >
  18. >I'm sure I've made some errors,so please don't turn on flame throwers ;)
  19. >
  20. >The most striking problem I've is that some stdio functions do not work
  21. >at all when invoked in the library code: at least stcul_d and sprintf do
  22. >not(I'm quite sure),so have I to do something special in order to get
  23. >those working?
  24.  
  25. stdio works IF your shared library was linked with libinitr.o.  If you 
  26. linked with libinit.o instead of libinitr.o, stdio will not work.  I
  27. believe libinitr.o was added in the 6.50 version, so if you have an
  28. earlier version, you won't be able to use stdio from a shared library.
  29.  
  30. >Then I tried to use amiga.lib sprintf. SAS/C manual says that I've to
  31. >slink with amiga.lib first of sc.lib,so I've done but the linker
  32. >just reports a multiple definition error (on Boopsi functions btw),so
  33. >what should I do in order to use amiga.lib stdio functions?
  34.  
  35. Don't use the amiga.lib sprintf, use its Sprintf.  There is a DOS function
  36. Sprintf that does not conflict with the ANSI namespace that the compiler
  37. uses.  In my opinion, it was a horrible mistake for Commodore to put
  38. non-ANSI functions in their library that have ANSI names, but that's water
  39. under the bridge.
  40.  
  41. I don't know what the deal is with your multiple definition error, I'd have
  42. to see more information.  Your exact link command line (whether with SC or
  43. SLINK) would help, as would the error or warning message(s) that you are
  44. getting.
  45.  
  46. -- 
  47.   *****                    / walker@unx.sas.com
  48.  *|_o_o|\\     Doug Walker<  BIX, Portal: djwalker
  49.  *|. o.| ||                \ AOL: weissblau
  50.   | o  |//     
  51.   ====== 
  52. Any opinions expressed are mine, not those of SAS Institute, Inc.
  53.  
  54.